package com.jiang.spring.controller;


import com.jiang.spring.service.BookService;
import com.jiang.spring.service.CheckoutService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.test.context.TestConstructor;

@Controller
public class BookController {
    
    @Autowired
    private BookService bookService;
    private CheckoutService checkoutService;
    
    public void buyBook(Integer userId,Integer bookId){
        bookService.buyBook(userId,bookId);
    }
    
    public void checkout(Integer userId,Integer[] bookIds){
        checkoutService.checkout(userId,bookIds);
    }
}
